home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
BASIC
/
TIMESERV.BAS
< prev
next >
Wrap
BASIC Source File
|
2000-09-26
|
5KB
|
136 lines
rem ==============================================================
rem == Interrupt $0B: ==
rem == AH=Funktionsnummer ==
rem == ==
rem == AH=1: GetParamOffset ==
rem == => AL = JIntNummer ==
rem == <= DI = Offset ==
rem == ==
rem == AH=2: AllocJanusMem ==
rem == => AL = Speichertyp ==
rem == => BX = Anzahl der Bytes ==
rem == <= BX = Offset auf Speicher ==
rem == ==
rem == AH=3: FreeJanusMem ==
rem == => AL = Speichertyp ==
rem == => BX = Offset auf Speicher ==
rem == ==
rem == AH=4: SetParamOffset ==
rem == => AL = JIntNummer ==
rem == => BX = Offset ==
rem == ==
rem == AH=5: Nicht benutzt ==
rem == AH=6: Nicht benutzt ==
rem == ==
rem == AH=11: GetService ==
rem == => AL = Flags ==
rem == => CX = LocalID ==
rem == => DI = Offset von PCCustomer ==
rem == => SI = AppID (2. Wort) ==
rem == => DS = AppID (1. Wort) ==
rem == => ES = Segment von FirstPCCustomer ==
rem == <= DI = Offset auf ServiceData-Struktur ==
rem == ==
rem == AH=12: CallService ==
rem == => DI = Service ==
rem == ==
rem == AH=13: ReleaseService ==
rem == => DI = Service ==
rem == ==
rem == AH=15: LockService ==
rem == => DI = Service ==
rem == ==
rem == AH=16: UnLockService ==
rem == => DI = Service ==
rem == ==
rem ==============================================================
$INCLUDE "REGNAMES.INC"
def seg = &hd000
cls
REG %AX,(2*256)+1 : rem AllocJanusMem
REG %BX,24 : rem Bytes
CALL INTERRUPT &H0B : rem AllocJanusMem(8,1)
mem=REG(%BX)
if mem<1 then
?"Nicht genug Janus-Speicher"
goto ende
end if:rem
rAH=11 : rem GetService
rAL=&H10 : rem Flags
rCX=1 : rem LocalID
rDI=mem : rem Offset auf PC-Server
rSI=1 : rem ApplicationID (Low)
rDS=0 : rem ApplicationID (High)
rES=&HD000 : rem Segment von PC-Server
poke mem+00,&HB8 : rem MOV AX,0D000
pokei mem+01,&HD000 : rem MOV ES,AX
poke mem+03,&H8E : rem ES MOV B[mem+20],127
poke mem+04,&HC0 : rem RETF
poke mem+05,&H26
poke mem+06,&HC6
poke mem+07,&H06
pokei mem+08,mem+12
poke mem+10,&H7F
poke mem+11,&HCB
poke mem+12,255
REG %AX,(rAH*256)+rAL
REG %CX,rCX
REG %DI,rDI
REG %SI,rSI
REG %DS,rDS
REG %ES,rES
call interrupt &HB
rAX=REG(%AX)
x=varptr(rAX)
l=peek(x+0)
c=peek(x+1)
serv=reg(%DI)
if l=0 and c=0 and serv>0 then
REG %DI,serv : rem Service
REG %AX,(12*256) : rem CallService
CALL INTERRUPT &H0B : rem CallService()
while (peek(mem+12)<>127) : wend
?"Service: ";serv
?"AmigaUserCount:";peek(serv+9)
?"PCUserCount: ";peek(serv+10)
?"---------------------------------"
segm=peeki(serv+24)
ofs=peeki(serv+22)
def seg = segm
?"Jahr: ";peeki(ofs+0)
?"Monat: ";peek(ofs+2)
?"Tag: ";peek(ofs+3)
?"Stunde: ";peek(ofs+4)
?"Minute: ";peek(ofs+5)
?"Sekunde:";peek(ofs+6)
?"String: ";
for i=7 to 7+24
?chr$(peek(ofs+i));
next
?"Error: ";peeki(ofs+34)
?"---------------------------------"
REG %DI,serv : rem Service
REG %AX,(13*256) : rem ReleaseService
CALL INTERRUPT &H0B : rem ReleaseService()
REG %BX,mem : rem Speicher
REG %AX,(3*256)+1 : rem FreeJanusMem
CALL INTERRUPT &H0B : rem FreeJanusMem(mem,1)
else
?"TimeServ ist nicht aktiv."
end if
ende:
end